<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/mainstyle.css"/>
	<link rel="stylesheet" href="./css/themes/base/jquery.ui.all.css">
	<script src="./js/jquery-1.6.2.min.js"></script>
    <link rel="stylesheet" href="./css/demos.css">
    
<title>中继列表</title>
</head>

<script>

 
		
//页码导航 
function post_list(index,curpage,maxpage)
{ 
     if (parseInt(index) <= parseInt(maxpage) && parseInt(index) > 0  && parseInt(curpage)!=parseInt(index) )
	 {
        document.form1.action = '?action=list&curpage='+index; 
	    document.form1.submit(); 
	    return true;
	 }
	 return false;
}

	function delete_confirm()
	{
		if (confirm("确定要删除这个条中继落地吗?"))  {
			 return true;	
		}
		return false;	
	}
function  change_acct_id(acct_id)
{
        //document.form1.action = '?action=list&curpage='+goto_index; 
		
		//alert(acct_id);
	    document.form1.submit(); 
	    return true;		 
	
}

	
	
</script>
<body>
 <form name="form1" method="post" action="?action=list&curpage=<% $curpage %>">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                
                <td width="97%" valign="bottom"><span class="table_caption">中继(落地)管理 - (IP/H323对接-SIP注册-O口网关)</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="table_caption">
            <img src="images/add.gif" width="10" height="10" /> <a href="?action=add_send&curpage=<% $curpage %>" >新增中继落地</a></span>
             
             </div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
    

  <tr>
  
             
            <td width="2%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">序号</div></td>
            <td width="10%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">名称</div></td>
            <td width="4%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">线路状态</div></td>  
            <td width="4%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">设备名称</div></td>
            <td width="4%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">设备密码</div></td>            
            <td width="2%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">状态</div></td>
             <td width="5%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">并发</div></td>  
            <td width="3%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">协议</div></td>
            <td width="3%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">类型</div></td>
            <td width="8%"  height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">IP地址</div></td>
             <td width="3%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">走媒体</div></td>  
             <td width="3%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">DTMF</div></td>    
            <td width="8%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">编码</div></td>  
            <td width="5%"   height="24"    bgcolor="d3eaef" class="STYLE6"><div align="center" class="table_title">操作</div></td>
                   
         

        </tr>
          
          
          <% foreach from=$table_array item=eachone key=keyname %>  	
          <tr>
          
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.check_id%></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><%if  $eachone.peerstate eq 1 %><font color="#0000FF"><% $eachone.trunkname %></font><%else%><% $eachone.trunkname|smartTruncate:10:".." %><%/if%></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><%if  $eachone.peerstate eq 1 %><font color="#0000FF"><% $eachone.peerstatetext %></font><%else%><% $eachone.peerstatetext %><%/if%><%if $eachone.peerstatetext eq '' %>正常<%/if%> </div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><%if  $eachone.peerstate eq 1 %><font color="#0000FF"><% $eachone.peername %></font><%else%> <% $eachone.peername %><%/if%></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.secret|smartTruncate:6:".." %></div></td>            
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% if $eachone.enable eq 1 %>开启<% else %>禁用<% /if %><% $eachone.enable %></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.curcallcount|string_format:"%03d" %>/<% $eachone.calllimit|string_format:"%03d" %></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.tech %></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% if $eachone.trunkprototype eq "reg" %>注册<%elseif  $eachone.trunkprototype eq "ip" %>对接<%elseif  $eachone.trunkprototype eq "iad" %>网关<%else%>----<%/if%>  </div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% if $eachone.trunkprototype eq  "iad" %><% $eachone.peeripaddr %>:<% $eachone.peerport %><%else%><% $eachone.host %>:<% $eachone.port %><%/if%></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% if $eachone.canreinvite eq 'yes' %>否<% else %>是<%/if%>  </div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.dtmfmode %></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><% $eachone.allow %></div></td>
            <td height="20" bgcolor="<% if $keyname is even %>#FFFFFF<%else%>#F3F3F3<%/if%>"><div align="center" class="STYLE19"><a href="?action=edit_send&id=<% $eachone.decode_id %>&curpage=<% $curpage %>">编辑</a>&nbsp; <a href="?action=delete_post&id=<% $eachone.decode_id %>&curpage=<% $curpage %>"  onClick="return delete_confirm()" >删除</a></div></td>


                 
          </tr>
        <% /foreach %>
    </table></td>
  </tr>
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="57%"><div align="left"><span class="STYLE21">共
              <% $record_count %>
              条记录，并发总计 <% $curcallcount %>线 当前第
              <% $curpage %>
              /
              <% $maxpage %>
              页，每页
              <% $pagelimtcount %>
          条记录</span></div></td>
        <td width="43%"><table width="180" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td width="40"><div align="center"> <a href="#" class="STYLE21" onclick="return post_list('1',<% $curpage %>,<% $maxpage %>)" >首页</a> </div></td>
            <td width="40"><div align="center"> <a href="#" class="STYLE21" onclick="return post_list('<% $curpage-1 %>',<% $curpage %>,<% $maxpage %>)" >上一页</a></div></td>
            <td width="40"><div align="center"> <a href="#" class="STYLE21" onclick="return post_list('<% $curpage+1 %>',<% $curpage %>,<% $maxpage %>)" >下一页</a></div></td>
            <td width="40"><div align="center"> <a href="#" class="STYLE21" onclick="return post_list('<% $maxpage  %>',<% $curpage %>,<% $maxpage %>)" >尾页</a></div></td>
           
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
 </form>
</body>
</html>
